package org.spamforces.model;

import com.codeforces.commons.time.TimeUtil;

import java.util.Date;

/**
 * @author IvanPopelyshev (ivan.popelyshev@gmail.com)
 */
public class Broadcast extends ApplicationEntity {
    private Long parentBroadcastId;
    private long userId;
    private Date creationTime;
    private Date scheduledTime;
    private Date completedTime;
    private String subjectTemplate;
    private String bodyTemplate;
    private String templateParams;
    private String testEmailProviderResponse;
    private String emailProvidersId;
    private BroadcastStatus status;

    public void setParentBroadcastId(Long parentBroadcastId) {
        this.parentBroadcastId = parentBroadcastId;
    }

    public Long getParentBroadcastId() {
        return parentBroadcastId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getUserId() {
        return userId;
    }

    public void setEmailProvidersId(String emailProvidersId) {
        this.emailProvidersId = emailProvidersId;
    }

    public String getEmailProvidersId() {
        return emailProvidersId;
    }

    public void setCreationTime(Date creationTime) {
        this.creationTime = TimeUtil.toDate(creationTime);
    }

    public Date getCreationTime() {
        return TimeUtil.toDate(creationTime);
    }

    public void setScheduledTime(Date scheduledTime) {
        this.scheduledTime = TimeUtil.toDate(scheduledTime);
    }

    public Date getScheduledTime() {
        return TimeUtil.toDate(scheduledTime);
    }

    public void setSubjectTemplate(String subjectTemplate) {
        this.subjectTemplate = subjectTemplate;
    }

    public String getSubjectTemplate() {
        return subjectTemplate;
    }

    public void setBodyTemplate(String bodyTemplate) {
        this.bodyTemplate = bodyTemplate;
    }

    public String getBodyTemplate() {
        return bodyTemplate;
    }

    public void setCompletedTime(Date completedTime) {
        this.completedTime = TimeUtil.toDate(completedTime);
    }

    public Date getCompletedTime() {
        return TimeUtil.toDate(completedTime);
    }

    public void setTemplateParams(String templateParams) {
        this.templateParams = templateParams;
    }

    public String getTemplateParams() {
        return templateParams;
    }

    public void setTestEmailProviderResponse(String testEmailProviderResponse) {
        this.testEmailProviderResponse = testEmailProviderResponse;
    }

    public String getTestEmailProviderResponse() {
        return testEmailProviderResponse;
    }

    public void setStatus(BroadcastStatus status) {
        this.status = status;
    }

    public BroadcastStatus getStatus() {
        return status;
    }
}
